home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / ODBindng.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  7.0 KB  |  292 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: ODBindng.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODBinding_xh
  18. #define SOM_ODBinding_xh
  19.  
  20. class ODBinding;
  21.  
  22. #define ODBinding_MajorVersion 2
  23. #define ODBinding_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODObject_xh
  31. #include <ODObject.xh>
  32. #endif
  33.  
  34. #ifndef ODBinding_API
  35. #define ODBinding_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODBinding;
  50. class ODSession;
  51. class ODStorageUnit;
  52. class ODPart;
  53. class ODTypeList;
  54. class ODNameSpaceManager;
  55.  
  56. /*
  57.  * End of user-defined types.
  58.  */
  59.  
  60. #ifdef OLDIBMSOMAPISUPPORT
  61. #define ODBindingCClassData ODBindingClassData
  62. #define ODBindingNewClass(major,minor) somNewVersionedClassReference(ODBinding,major,minor)
  63. #endif
  64.  
  65. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  66. #define ODBindingMetaClass SOMClass
  67.  
  68. #if PRAGMA_ALIGN_SUPPORTED
  69. #  pragma options align=power
  70. #endif
  71.  
  72. /* The API to the ODBinding class object, and the methods it introduces. */
  73. SOMEXTERN struct ODBindingClassDataStructure {
  74. #ifdef OLDIBMSOMAPISUPPORT
  75.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  76. #else
  77.     long zero;
  78. #endif
  79.     somStaticClassInfo *sci;
  80.     somDToken        instanceDataToken;
  81.     long reserved [3];
  82.     somMToken ChooseEditorForPart;
  83.     somMToken GetContainerSuite;
  84.     somMToken reserved1;
  85.     somMToken reserved2;
  86.     somMToken GetUserStringForKind;
  87.     somMToken GetUserStringForEditor;
  88.     somMToken GetUserStringForCategory;
  89.     somMToken GetODFileSpecFromEditor;
  90.     somMToken reserved3;
  91.     somMToken reserved4;
  92.     somMToken reserved5;
  93.     somMToken reserved6;
  94.     somMToken reserved7;
  95.     somMToken reserved8;
  96.     somMToken reserved9;
  97.     somMToken reserved10;
  98.     somMToken reserved11;
  99.     somMToken reserved12;
  100.     somMToken reserved13;
  101. } SOMDLINK ODBindingClassData;
  102.  
  103. #if PRAGMA_ALIGN_SUPPORTED
  104. #  pragma options align=reset
  105. #endif
  106.  
  107. #if !defined(ODBinding_Class_Source) && !defined(SOM_Module_odbindng_Source)
  108. #if PRAGMA_IMPORT_SUPPORTED
  109. #pragma import list ODBindingClassData
  110. #endif
  111. #endif
  112.  
  113.  
  114. /*
  115.  * -- Typedefs and inline method declarations for left path inherited methods
  116.  * -- are omitted because this compilation had -museinheritedmethods in effect
  117.  */
  118.  
  119.  
  120. /*
  121.  * -- Typedefs for ODBinding Method Procedures
  122.  */
  123. SOMEXTERN {
  124. typedef ODEditor   (* SOMLINK somTD_ODBinding_ChooseEditorForPart)(ODBinding *somSelf, Environment *ev,
  125.         ODStorageUnit* thePartSU,
  126.         ODType newKind);
  127. typedef ODContainerSuite   (* SOMLINK somTD_ODBinding_GetContainerSuite)(ODBinding *somSelf, Environment *ev,
  128.         ODContainerType containerType);
  129. typedef ODBoolean   (* SOMLINK somTD_ODBinding_GetUserStringForKind)(ODBinding *somSelf, Environment *ev,
  130.         ODKind kind,
  131.         ODName* name);
  132. typedef ODBoolean   (* SOMLINK somTD_ODBinding_GetUserStringForEditor)(ODBinding *somSelf, Environment *ev,
  133.         ODEditor editor,
  134.         ODName* name);
  135. typedef ODBoolean   (* SOMLINK somTD_ODBinding_GetUserStringForCategory)(ODBinding *somSelf, Environment *ev,
  136.         ODCategory category,
  137.         ODName* name);
  138. typedef ODBoolean   (* SOMLINK somTD_ODBinding_GetODFileSpecFromEditor)(ODBinding *somSelf, Environment *ev,
  139.         ODEditor editor,
  140.         ODByteArray* fileSpec);
  141. }
  142.  
  143. #endif /* ODBinding_API */
  144.  
  145.  
  146. /*
  147.  * -- This emitter treats Method Tokens as Thunks by default.
  148.  * -- Use the sc modifier "nothunks" to change this default
  149.  */
  150. #undef somresolve_
  151. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  152.  
  153. /*
  154.  * -- The C++ Wrapper Class for ODBinding
  155.  */
  156. class ODBinding : public ODObject
  157. {
  158. public:
  159.  
  160. // ODBinding::new registers use of the class object, and then uses somNew
  161. // to allocate memory and load the object method table pointer. 
  162. void *operator new(size_t size)
  163. {
  164.     SOM_IgnoreWarning(size);
  165.     // Allocate memory using the default allocator for ODBinding, and
  166.     // clear mem & set method table pointer, call basic initialization
  167. #ifdef SOMCHKNULL
  168.     void * __somResult = (void *)
  169.       somNewObject(ODBinding);
  170.     SOMCHKNULL(__somResult);
  171.     return __somResult;
  172. #else
  173.     return (void*) somNewObject(ODBinding);
  174. #endif
  175. }
  176.  
  177. // ODBinding::delete uses the default deallocator for the object's class.
  178. void operator delete(void * obj)
  179. {
  180.     if (obj) {
  181.         SOM_Resolve(obj,SOMObject,somFree)
  182.            ( (SOMObject*) obj );
  183.     }
  184. }
  185.  
  186. /* method: ChooseEditorForPart */
  187. ODEditor   ChooseEditorForPart(Environment *ev,
  188.         ODStorageUnit* thePartSU,
  189.         ODType newKind)
  190. {
  191.    #ifdef SOMCHKEXCEPT
  192.    ODEditor __somResult = 
  193.       SOM_ResolveD(this,ODBinding,ODBinding,ChooseEditorForPart)
  194.     (this,ev,thePartSU,newKind);
  195.       SOMCHKEXCEPT;
  196.    return __somResult;
  197. #else
  198.    return SOM_ResolveD(this,ODBinding,ODBinding,ChooseEditorForPart)
  199.     (this,ev,thePartSU,newKind);
  200. #endif
  201. }
  202.  
  203. /* method: GetContainerSuite */
  204. ODContainerSuite   GetContainerSuite(Environment *ev,
  205.         ODContainerType containerType)
  206. {
  207.    #ifdef SOMCHKEXCEPT
  208.    ODContainerSuite __somResult = 
  209.       SOM_ResolveD(this,ODBinding,ODBinding,GetContainerSuite)
  210.     (this,ev,containerType);
  211.       SOMCHKEXCEPT;
  212.    return __somResult;
  213. #else
  214.    return SOM_ResolveD(this,ODBinding,ODBinding,GetContainerSuite)
  215.     (this,ev,containerType);
  216. #endif
  217. }
  218.  
  219. /* method: GetUserStringForKind */
  220. ODBoolean   GetUserStringForKind(Environment *ev,
  221.         ODKind kind,
  222.         ODName* name)
  223. {
  224.    #ifdef SOMCHKEXCEPT
  225.    ODBoolean __somResult = 
  226.       SOM_ResolveD(this,ODBinding,ODBinding,GetUserStringForKind)
  227.     (this,ev,kind,name);
  228.       SOMCHKEXCEPT;
  229.    return __somResult;
  230. #else
  231.    return SOM_ResolveD(this,ODBinding,ODBinding,GetUserStringForKind)
  232.     (this,ev,kind,name);
  233. #endif
  234. }
  235.  
  236. /* method: GetUserStringForEditor */
  237. ODBoolean   GetUserStringForEditor(Environment *ev,
  238.         ODEditor editor,
  239.         ODName* name)
  240. {
  241.    #ifdef SOMCHKEXCEPT
  242.    ODBoolean __somResult = 
  243.       SOM_ResolveD(this,ODBinding,ODBinding,GetUserStringForEditor)
  244.     (this,ev,editor,name);
  245.       SOMCHKEXCEPT;
  246.    return __somResult;
  247. #else
  248.    return SOM_ResolveD(this,ODBinding,ODBinding,GetUserStringForEditor)
  249.     (this,ev,editor,name);
  250. #endif
  251. }
  252.  
  253. /* method: GetUserStringForCategory */
  254. ODBoolean   GetUserStringForCategory(Environment *ev,
  255.         ODCategory category,
  256.         ODName* name)
  257. {
  258.    #ifdef SOMCHKEXCEPT
  259.    ODBoolean __somResult = 
  260.       SOM_ResolveD(this,ODBinding,ODBinding,GetUserStringForCategory)
  261.     (this,ev,category,name);
  262.       SOMCHKEXCEPT;
  263.    return __somResult;
  264. #else
  265.    return SOM_ResolveD(this,ODBinding,ODBinding,GetUserStringForCategory)
  266.     (this,ev,category,name);
  267. #endif
  268. }
  269.  
  270. /* method: GetODFileSpecFromEditor */
  271. ODBoolean   GetODFileSpecFromEditor(Environment *ev,
  272.         ODEditor editor,
  273.         ODByteArray* fileSpec)
  274. {
  275.    #ifdef SOMCHKEXCEPT
  276.    ODBoolean __somResult = 
  277.       SOM_ResolveD(this,ODBinding,ODBinding,GetODFileSpecFromEditor)
  278.     (this,ev,editor,fileSpec);
  279.       SOMCHKEXCEPT;
  280.    return __somResult;
  281. #else
  282.    return SOM_ResolveD(this,ODBinding,ODBinding,GetODFileSpecFromEditor)
  283.     (this,ev,editor,fileSpec);
  284. #endif
  285. }
  286.  
  287. };   /* ODBinding */
  288.  
  289.  
  290.  
  291. #endif       /* SOM_ODBinding_xh */
  292.